package com.bestow.basic.service.impl;

import java.util.List;
import com.bestow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestow.basic.mapper.FndCityMapper;
import com.bestow.basic.domain.FndCity;
import com.bestow.basic.service.IFndCityService;

/**
 * 市Service业务层处理
 * 
 * @author liliu
 * @date 2022-09-06
 */
@Service
public class FndCityServiceImpl implements IFndCityService 
{
    @Autowired
    private FndCityMapper fndCityMapper;

    /**
     * 查询市
     * 
     * @param city 市主键
     * @return 市
     */
    @Override
    public FndCity selectFndCityByCity(String city)
    {
        return fndCityMapper.selectFndCityByCity(city);
    }

    /**
     * 查询市列表
     * 
     * @param fndCity 市
     * @return 市
     */
    @Override
    public List<FndCity> selectFndCityList(FndCity fndCity)
    {
        return fndCityMapper.selectFndCityList(fndCity);
    }

    /**
     * 新增市
     * 
     * @param fndCity 市
     * @return 结果
     */
    @Override
    public int insertFndCity(FndCity fndCity)
    {
        fndCity.setCreateTime(DateUtils.getNowDate());
        return fndCityMapper.insertFndCity(fndCity);
    }

    /**
     * 修改市
     * 
     * @param fndCity 市
     * @return 结果
     */
    @Override
    public int updateFndCity(FndCity fndCity)
    {
        fndCity.setUpdateTime(DateUtils.getNowDate());
        return fndCityMapper.updateFndCity(fndCity);
    }

    /**
     * 批量删除市
     * 
     * @param citys 需要删除的市主键
     * @return 结果
     */
    @Override
    public int deleteFndCityByCitys(String[] citys)
    {
        return fndCityMapper.deleteFndCityByCitys(citys);
    }

    /**
     * 删除市信息
     * 
     * @param city 市主键
     * @return 结果
     */
    @Override
    public int deleteFndCityByCity(String city)
    {
        return fndCityMapper.deleteFndCityByCity(city);
    }
}
